Skip to content

Conversation

@jaclync
Copy link
Contributor

@jaclync jaclync commented Oct 31, 2025

Part of WOOMOB-1609

Just one review is required.

Description

This PR adds new catalog API endpoints to POSCatalogSyncRemote that enable POS catalog generation and download functionality.

This is an updated version of the previous implementation from #16041 and #16042, adapted to work with the latest catalog API design pcShBQ-3wD-p2#comment-5426 with one endpoint to request catalog generation.

The changes introduce two new methods to the networking layer:

  • requestCatalogGeneration(for:forceGeneration:) - Initiates catalog generation and returns the status with optional download URL
  • downloadCatalog(for:downloadURL:) - Downloads and parses the generated catalog file into products and variations

Additionally, this PR removes unused mock response files for the catalog status endpoint that is no longer needed.

Test Steps

Just CI for now, as the endpoints aren't used in the app in this PR. I tested the endpoints in a separate branch with supported stores.


  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@jaclync jaclync added type: task An internally driven task. feature: POS labels Oct 31, 2025
@jaclync jaclync added this to the 23.7 milestone Oct 31, 2025
@jaclync jaclync changed the title Add catalog API endpoints to POSCatalogSyncRemote [Local Catalog] Add POS catalog request & download endpoints for full sync Oct 31, 2025
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Oct 31, 2025

App Icon📲 You can test the changes from this Pull Request in WooCommerce iOS Prototype by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS Prototype
Build Numberpr16298-e0ea350
Version23.5
Bundle IDcom.automattic.alpha.woocommerce
Commite0ea350
Installation URL692ufh1p7lduo
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

Copy link
Contributor

@joshheald joshheald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great 👍

/// - Returns: List of products and variations in the POS catalog.
// periphery:ignore - TODO - remove this periphery ignore comment when this endpoint is integrated with catalog sync
public func downloadCatalog(for siteID: Int64, downloadURL: String) async throws -> POSCatalogResponse {
// TODO: WOOMOB-1173 - move download task to the background using `URLSessionConfiguration.background`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Just what I was going to say 😊

@jaclync jaclync merged commit 89d3065 into trunk Nov 3, 2025
15 checks passed
@jaclync jaclync deleted the feat/WOOMOB-1609-catalog-api-networking-layer branch November 3, 2025 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: POS type: task An internally driven task.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants